package com.yuanfengerp.logistics.controller;


import com.yuanfengerp.logistics.moudel.LogisticsInfo;
import com.yuanfengerp.logistics.service.impl.ILogisticsServiceImpl;
import com.yuanfengerp.publicUtil.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Slf4j
@CrossOrigin
@RestController
@RequestMapping
public class LogisticsController {

//    @Qualifier("ILogisticsService")
    @Autowired
    private ILogisticsServiceImpl ilsi;
    @PostMapping("/insertLogisticsManage")
    public Result<String> insertLogisticsManage(@RequestBody LogisticsInfo logistics){
        return ilsi.insertLogisticsManage(logistics);
    }
    @PostMapping("/getLogisticsManage")
    public Result<List<LogisticsInfo>> getLogisticsManage(@RequestBody Map<String,Object> params){
        System.out.println(params.toString());
        return ilsi.getLogisticsManage(params);
    }
    @PostMapping("/deleteLogisticsManage")
    public Result<String> deleteLogisticsManage(String logistics_ID){
        return ilsi.deleteLogisticsManage(logistics_ID);
    }
    @PostMapping("/updateLogisticsManage")
    public Result<String> updateLogisticsManage(@RequestBody LogisticsInfo logistics){
        return ilsi.updateLogisticsManage(logistics);
    }
    @PostMapping("/selectLogisticsManageInfo")
    public Result<List<LogisticsInfo>> selectLogisticsManageInfo(String logistics_ID){
        System.out.println(logistics_ID);
        return ilsi.selectLogisticsManageInfo(logistics_ID);
    }

}
